package utils

import (
	"fmt"
	"time"
)

type Logger struct {
	Level string
	Name  string
}

func (l *Logger) printPrefix() {
	if l.Level == "" {
		l.Level = "INFO"
	}
	fmt.Printf("[%v] [%s] [%s] - ",
		time.Now().Format("2006-01-02 15:04:05"), l.Level, l.Name)
}

func (l *Logger) Message(message string, v ...interface{}) {
	l.printPrefix()
	fmt.Printf(message+"\n", v...)
}
